<%--
  Created by IntelliJ IDEA.
  User: Mr.Xhai
  Date: 2018/11/15
  Time: 14:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page isELIgnored="false" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<div id="" style="width: 700px;">
    <h1 style="color: red;text-align: center;">电子图书列表</h1>
    <form action="operaEntry" method="post">
        <table width="100%" border="">
            <tr>
                <th style="border:1px solid #FFF;text-align: left;" colspan="4">
                    图书分类:

                    <select name="categoryId">
                        <option value="0">全部</option>
                        <s:iterator value="categorys" var="cas">
                            <s:if test="#cas.id == categoryId">
                                <option value="<s:property value="#cas.id"/>" selected><s:property value="#cas.name"/> </option>
                            </s:if>
                            <s:else>
                                <option value="<s:property value="#cas.id"/>"><s:property value="#cas.name"/> </option>
                            </s:else>
                        </s:iterator>
                    </select>
                    <input type="submit"value="查询" />
                </th>
                <th style="border:1px solid #FFF;text-align: right;" colspan="2">
                    <a href="modirebok.jsp">新增电子图书</a>
                </th>
            </tr>
            <tr style="background-color: indianred;">
                <th>图书编号</th>
                <th>图书名称</th>
                <th>图书摘要</th>
                <th>上传人</th>
                <th>上传时间</th>
                <th>操作</th>
            </tr>
            <s:iterator var="ents" value="ebookEntries">
                <tr>
                    <td><s:property value="#ents.id"/> </td>
                    <td><s:property value="#ents.title"/></td>
                    <td><s:property value="#ents.summary"/></td>
                    <td><s:property value="#ents.uploaduser"/></td>
                    <td><s:property value="#ents.createdate"/></td>
                    <td style="text-align: center;">
                        <a href="/showStat.action?entId=<s:property value="#ents.id"/>">修改</a>
                        <a href="/delEbookStatk.action?ids=<s:property value="#ents.id"/>">删除</a>
                    </td>
                </tr>
            </s:iterator>
        </table>
    </form>
    &nbsp;&nbsp;&nbsp;
    <div class="position" style="text-align: right;"> 共<s:property value="page.totalCount"/>条记录&nbsp;每页4条&nbsp;
        <a href="/operaEntry.action?currentPage=1" title="首页">&laquo;首页</a>
        <s:if test="page.hasPrePage == true">
            <a href="/operaEntry.action?currentPage=${currentPage-1}" title="上一页">&laquo; 上一页</a>
        </s:if>
        <s:if test="page.hasNextPage == true">
            <a href="/operaEntry.action?currentPage=${currentPage+1}" title="下一页">下一页&raquo;</a>
        </s:if>
        <a href="/operaEntry.action?currentPage=${page.totalPage}" title="末页">末页&raquo;</a>
    </div>
</div>
</body>
</html>
